@**
 * Default field constructor.
 *
 * It generates field as following:
 * {{{
 * <dl class="error">
 *   <dt><label for="name">Your name:</label></dt>
 *   <dd><input type="text" id="name" name="name"></dd>
 *   <dd class="error">This field is required</dd>
 *   <dd class="info">Required</dd>
 * </dl>
 * }}}
 *
 * @param el The field informations.
 *@
@(elements: FieldElements)

<dl class="@elements.args.get('_class) @if(elements.hasErrors) {error}" id="@elements.args.get('_id).getOrElse(elements.id + "_field")">
    @if(elements.hasName) {
    <dt>@elements.name</dt>
    } else {
    <dt><label for="@elements.id">@elements.label</label></dt>
    }
    <dd>@elements.input</dd>
    @elements.errors.map { error =>
        <dd class="error">@error</dd>
    }
    @elements.infos.map { info =>
        <dd class="info">@info</dd>
    }
</dl>
